<template>
  <div>
    <h3>新闻详情</h3>
    <!-- id: {{ query.id }} <br />
    title: {{ query.title }} <br />
    content: {{ query.content }} <br /> -->
    <!-- id: {{ params.id }} <br />
    title: {{ params.title }} <br />
    content: {{ params.content }} <br /> -->
    <!-- 使用路由的porps的方式解构参数 -->

    id: {{ id }} <br />
    title: {{ title }} <br />
    content: {{ content }} <br />
  </div>
</template>


<script setup lang="ts">
// import { ref, toRef, toRefs } from 'vue'
// import { useRoute } from 'vue-router'
// //const r = useRoute()
// const { query, name, params } = toRefs(useRoute())

import { defineProps } from 'vue'

defineProps(['id', 'title', 'content'])
</script>


<style scoped>
</style>